﻿@page "/"
@using WebviewAppShared
@* NOTE: The full namespace is included here to work around this bug: https://github.com/dotnet/aspnetcore/issues/30851 *@
@inject BlazorWpfApp.AppState AppState

<h3>Hello, world!</h3>

<p>The current count is <strong>@AppState.Counter</strong></p>

<button @onclick="IncrementCount">Increment</button>
<button @onclick="TriggerException">Throw</button>

<p>This is a shared component</p>
<SharedComponent />

@code {
    void IncrementCount()
    {
        AppState.Counter++;
    }

    void TriggerException()
    {
        throw new InvalidTimeZoneException("This is an exception from an event handler");
    }
}
